package com.lmz.project.redis.arithmetic.utils;

/**
 * 数组工具类
 */
public class ArrUtils {
    //创建数组
    public static int[] createIntArr(int V,int n){
        int[] nums=new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] =(int) (Math.random() * V) +1;
        }
        return nums;
    }

    //复制数组
    public static int[] copyArr(int[] arr){
        int n = arr.length;
        int[] copyArr = new int[n];
        for (int i = 0; i < arr.length; i++) {
            copyArr[i] = arr[i];
        }
        return copyArr;
    }

}
